package day0318.enum_;

/**
 * @Author Stringzhua
 * @Date 2024/3/18 14:58
 * description:Color枚举类
 */
public enum Color {
    RED(1, "红"), BLUE(2, "蓝"), GREEN(3, "绿"), YELLOW(4, "黄色");
    private final int value;
    private final String stringName;

    Color(int value, String stringName) {
        this.value = value;
        this.stringName = stringName;
    }

    @Override
    public String toString() {
        return value + " " + stringName;
    }

    public int getValue() {
        return value;
    }

    public String getStringName() {
        return stringName;
    }
}
